﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace VolunteerManager.Model
{
    public class DataService : IDataService
    {
        public void GetData(Action<DataItem, Exception> callback)
        {
            // Use this to connect to the actual data service

            var item = new DataItem("Welcome to MVVM Light");
            callback(item, null);
        }

        public List<Voluteer> VolutterList
        {
            get
            {
                List<Voluteer> list = new List<Voluteer>();
                Voluteer v = new Voluteer();
                IList ss = v.AllData();
                foreach (object o in ss)
                {
                    list.Add(o as Voluteer);
                }

                return list;
            }
        }

        public Voluteer Vol
        {
            get
            {
                return VolutterList[0];
            }
        }
    }
}